package com.spstudio.iforward.end.action;

import java.util.Date;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.enterprise.inject.Model;
import javax.inject.Inject;

import com.spstudio.iforward.end.interfaces.IStatisticsBeanRemote;
import com.spstudio.iforward.end.qualifier.StatisticsStatelessBeanRemoteQualifier;

@Model
public class StatisticsAction {
	
	@Inject @StatisticsStatelessBeanRemoteQualifier IStatisticsBeanRemote statisticsBeanRemote;
	
	private Date queryMonth = new Date();
	private List<String[]> queryResult;

	@PostConstruct
	public void construct(){
		
	}
	
	public String query(){
		queryResult = statisticsBeanRemote.retrieveSpecialMonthPublishStoryCount(queryMonth);
		return null;
	}

	public Date getQueryMonth() {
		return queryMonth;
	}

	public void setQueryMonth(Date queryMonth) {
		this.queryMonth = queryMonth;
	}

	public List<String[]> getQueryResult() {
		return queryResult;
	}

	public void setQueryResult(List<String[]> queryResult) {
		this.queryResult = queryResult;
	}
}
